package restlet;

import org.restlet.Application;
import org.restlet.Context;
import org.restlet.Restlet;
import org.restlet.routing.Router;

public class DefaultApplication extends Application {
	public DefaultApplication(Context parentContext) {
		super(parentContext);
	}

	/**
	 * Creates a root Restlet that will receive all incoming calls.
	 */
	public Restlet createRoot() {
		// Create a root router
		Router router = new Router(getContext());
		// Attach the handlers to the root router
		// 주소가 'service/item'이면 ResourceItems.class를 생성하고 적절한 핸들러 함수를 호출해라.
		router.attach("/service/item", ResourceItems.class);

		// Return the root router
		return router;
	}
};